package app.keter.controller;

import app.keter.secruity.JwtUserDetails;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;

/**
 * Created by gkatzioura on 9/2/16.
 */
@Controller
public class BaseController {

	protected JwtUserDetails getCurrentUser() {
		Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        return (JwtUserDetails) principal;
	}
}
